<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	 <span class="color_red">*</span>项目基本情况
</div>
<table class="t_css table01" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="pro_info">
	<col style="width: 16%" />
	<col style="width: 34%" />
	<col style="width: 16%" />
	<col style="width: 34%" />
	

	<tr class="li_1">
		<td align="right">项目名称：</td>
		<td colspan="3"><input type='text' name='proposal/zh_title'
			id='zh_title' style="width: 80%"
			class="input_css required maxlength:100" maxlength="100"
			value='<x:out select="$xmlData/data/proposal/zh_title"/>'
			label="项目名称"></td>
	</tr>
	<tr>
		<td  align="right">亚类名称：</td>
		<td  colspan="3" align="left" >
			<c:set var="subclass"><x:out select="$xmlData/data/proposal/subclass_value" /></c:set>
			<cpt:select key="subclass2" id="subclass"  value="${subclass}" onChange="initControlValue(this.id);" className="selectWidth2"/>
			<input type="hidden" name="proposal/subclass_value" class="required" label="亚类名称" value="<x:out select="$xmlData/data/proposal/subclass_value" />"/>
			<input type="hidden" name="proposal/subclass_name" value="<x:out select="$xmlData/data/proposal/subclass_name" />" /></td>
		</td>
	</tr>
	<tr>
		<td  align="right">指南方向：</td>
		<td  colspan="3" align="left" >
			<c:set var="applicant_subject_value"><x:out select="$xmlData/data/proposal/applicant_subject_value" /></c:set>
			<c:set var="appl_sub_params">
				{'grant_code':'<x:out select="$xmlData/data/proposal/sub_grant_code" />','stat_year':'${param.statYear}'}
			</c:set>
			<input name="proposal/applicant_subject_value" type="hidden" value="<x:out select="$xmlData/data/proposal/applicant_subject_value" />" class="required " label="指南方向"/>
			<input name="proposal/applicant_subject_name" type="hidden" value="<x:out select="$xmlData/data/proposal/applicant_subject_name" />" />
			<cpt:select style="width: 50%;" id="applicant_subject" key="applicant_subject" className="selectWidth2" onChange="initControlValue('applicant_subject')" value="${applicant_subject_value}" sqlParamVal="${appl_sub_params}"></cpt:select>
		</td>
	</tr>

	<tr>
		<td align="right">项目开始时间：</td>
        <td colspan="1"><span name="proposal/start_date" >${param.pro_start_date}</span></td>
		<td align="right">项目结束时间：</td>
        <td><span name="proposal/end_date" >${param.pro_end_date}</span></td>
	</tr>

	<tr>
		<td align="right">依托单位联系人姓名：</td>
		<td colspan="1"><input type="text" label="依托单位联系人姓名"
			name="proposal/contact_psn_cname" class="input_css required"
			maxlength="20"
			value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
		</td>
		<td align="right">依托单位联系人手机：</td>
		<td><input type="text" label="依托单位联系人手机"
			name="proposal/contact_psn_mobile" class="required mobile"
			onfocus="InitInput.setNumber(this,11,0,0);"
			value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" />
		</td>
	</tr>
	<tr>
		<td align="right" >学科名称：</td>
		<td colspan="1">
			<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_value" />','name':'<x:out select="$xmlData/data/proposal/subject_name" />'}</c:set>
			<cpt:tree key="subject2" cacheable="false" value="${subject }"  label="学科名称"  
	       			id="subject"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValueExt2" />
			<input type="hidden" id="subject_value" name="proposal/subject_value"  class="required"  value="<x:out select="$xmlData/data/proposal/subject_value" />" label="学科名称">
			<input type="hidden" id="subject_name" name="proposal/subject_name" value="<x:out select="$xmlData/data/proposal/subject_name" />">
		</td>
		<td align="right" >申报日期：</td>
		<td colspan="1"> <c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="apply_date_curr"  name="proposal/submit_date" value="${submit_date}" className="required date" label="申报日期" ></cpt:date>
		</td>
	</tr>

	<tr>
		<td align="right">
			项目报审级次：
		</td>
		<td>
			<c:set var="sub_step">{'id':'<x:out
					select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out
					select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
			<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang" readonly="true"
					  value="${sub_step}" label="项目报审级次" id="sub_step" onlyChooseLeaf="false"
					  showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
			<input id="sub_step_value" type="hidden" name="proposal/sub_step_value" class="required"
				   label="项目报审级次" value="<x:out select="$xmlData/data/proposal/sub_step_value" />" />
			<input id="sub_step_name" type="hidden" name="proposal/sub_step_name"
				   value="<x:out select="$xmlData/data/proposal/sub_step_name" />" />
		</td>
		<td align="right">项目申请金额<br/>（万元）：</td>
		<%--<td colspan="1"><span name="proposal/request_money" id= "request_money" ><x:out select="$xmlData/data/proposal/request_money" /></span></td>


		<td align="right">项目申请金额（万元）：</td>--%>
		<td>
			<input type='text' name="proposal/apply_money" class="required" id="applyMoney" onchange="InitMoney1()" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/apply_money"/>' label="项目申请金额">
		</td>
	</tr>
	
	<tr>
		<td align="right">中文关键词： <br>
			（用分号分开，最多5个）</td>
		<td nowrap colspan="3"><input id="keyword"
			name="proposal/keyword" label="中文关键词" type="text" required
			class="input_css required" style="width: 680px;" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/keyword" />" /></td>
	</tr>
<table class="t_css table01" width="100%" border="0" cellpadding="0"
		   cellspacing="1" id="pro_info4">
		<col style="width: 16%" />
		<col style="width: 34%" />
		<col style="width: 16%" />
		<col style="width: 34%" />
	<tr>
		<td align="right">英文关键词： <br>
			（用分号分开，最多5个）</td>
		<td nowrap colspan="3"><input id="en_keyword"
									  name="proposal/en_keyword" label="英文关键词" type="text" required
									  class="input_css required" style="width: 680px;" maxlength="500"
									  value="<x:out select="$xmlData/data/proposal/en_keyword" />" /></td>
	</tr>
</table>
<table class="t_css table01" width="100%" border="0" cellpadding="0"
	   cellspacing="1" id="pro_info2">
	<col style="width: 16%" />
	<col style="width: 34%" />
	<col style="width: 16%" />
	<col style="width: 34%" />

	<tr>
		<td align="right">中文摘要（限280字）：</td>

		<td colspan="3">
			<textarea name="proposal/zh_summary" style="width:750px; height:126px;" label="中文摘要"
					  class="input_textarea required maxlength:280"><x:out select="$xmlData/data/proposal/zh_summary"/></textarea>
			<input type="hidden" name="proposal/zh_summary_hidden" value="<x:out select="$xmlData/data/proposal/zh_summary_hidden"/>">
		</td>
	</tr>
	<tr>
		<td align="right">英文摘要（限2000字）：</td>

		<td colspan="3">
			<textarea name="proposal/en_summary" style="width:750px; height:126px;" label="英文摘要"
					  class="input_textarea required maxlength:2000"><x:out select="$xmlData/data/proposal/en_summary" /></textarea>
			<input type="hidden" name="proposal/en_summary_hidden" value="<x:out select="$xmlData/data/proposal/en_summary_hidden"/>">
		</td>
	</tr>
</table>
<div class="t_bar">
		项目负责人信息
	</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="pro_info3">
	<col style="width: 16%" />
	<col style="width: 17%" />
	<col style="width: 17%" />
	<col style="width: 16%" />
	<col style="width: 18%" />
	<col style="width: 16%" />
	<tr>
	
		<td align="right">姓名：</td>
		<td colspan="2"><span name="proposal/zh_person/fzr_name"> <x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/zh_name" />
		</span></td>
		<td align="right">性别：</td>
		<td colspan="2"><c:set var="gender_value">
				<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/gender_value" />
			</c:set> <c:if test="${gender_value=='M' }">
				<c:set var="gender_name">男</c:set>
			</c:if> <c:if test="${gender_value=='F' }">
				<c:set var="gender_name">女</c:set>
			</c:if> <c:if test="${empty gender_value}">
				<c:set var="gender_name"></c:set>
			</c:if> <span name="proposal/basic_info/gender_name">${gender_name }</span>
		</td>
	</tr>


	<tr>
		<td align="right">出生年月：</td>
		<td  colspan="2">
					<%-- <span name="proposal/zh_person/birthday" style="display: none;"> 
							<x:out select="$xmlData/data/zh_persons/zh_person/basic_info/birthday" />
					</span> --%>
					<span id = "fzbirthday" style="display: none;"><x:out select="$xmlData/data/zh_persons/zh_person/basic_info/birthday" /></span>
					<c:set var="birthday">
                        <x:out select="$xmlData/data/zh_persons/zh_person/basic_info/birthday" />
                   </c:set>
                   <c:set var="temp">${fn:substring(birthday,0,10) }</c:set>
                   
                   <span name="proposal/zh_person/birthday" >${fn:split(temp,'-')[0]}-${fn:split(temp,'-')[1]}  </span>
		</td>
		<td align="right">民族：</td>
		<td colspan="2"><span name="proposal/zh_person/ethnicity_name"> <x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/ethnicity_name" />
		</span></td>
	</tr>

	<tr>
		<td align="right">最高学位：</td>
		<td  colspan="2"><span name="proposal/zh_person/degree_name"><x:out select="$xmlData/data/zh_persons/zh_person/basic_info/degree_name" /></span></td>
		<td align="right">职称：</td>
		<td colspan="2">
			 <span name="proposal/prof_title_name" id ="prof_title"></span>
			 <input type="hidden" id="prof_title_name" value="<x:out select="$xmlData/data/zh_persons/zh_person/basic_info/prof_title_name" />" />
		<%-- <c:set var="prof_title">
				{'id':'<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/prof_title_value" />',
				'name':'<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/prof_title_name" />'}					
			</c:set> <cpt:tree key="prof_title" cacheable="false" value="${prof_title }"
				id="contact_prof_title" name="contact_prof_title" readonly="true"
				onClick="initTreeValueExt" /> <input type="hidden"
			id="prof_title_value" name="proposal/prof_title_value"
			value="<x:out select="$xmlData/data/proposal/prof_title_value" />"
			class="required" label="职称" /> <input type="hidden"
			id="prof_title_name" name="proposal/prof_title_name"
			value="<x:out select="$xmlData/data/proposal/prof_title_name"/>" /> --%>
		</td>
	</tr>

	<tr>
		<td align="right">职务：</td>
		
		<td colspan="2">
		<x:out select="$xmlData/data/zh_persons/zh_person/basic_info/position" />
		<%-- <input name="proposal/contact_position"
			value="<x:out select="$xmlData/data/proposal/contact_position"/>"
			class="required maxlength:50" label="职务" /></td> --%>
		<td align="right">电话：</td>
		<td colspan="2"><span name="proposal/contact/mobile"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/mobile" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>每年工作时间（月）：</td>
		<td colspan="2"><input type="text" label="每年工作时间（月）"
			name="proposal/work_months" id="work_months"
			class="input_text required valueLENum:work_months:12  valueGNum:work_months:0" 
			style="text-align: right;" onfocus="InitInput.setNumber(this,2,1,1);"
			value="<x:out select="$xmlData/data/proposal/work_months" />" /></td>
		<td align="right">传真：</td>
		<td colspan="2"><span name="proposal/contact/fax"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/fax" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>所在地区：</td>
		<td colspan="2"><c:set var="ah_city">
				<x:out select="$xmlData/data/proposal/ah_city_value" />
			</c:set> <cpt:select id="ah_city" style="width:177px;" key="ah_city"
				value="${ah_city}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="ah_city_value"
			name="proposal/ah_city_value" class="required"
			value="${ah_city}" label="所在地区"> <input
			type="hidden" name="proposal/ah_city_name"
			value="<x:out select="$xmlData/data/proposal/ah_city_name" />">
			
			<%-- <c:set var="cooperation_area">
				<x:out select="$xmlData/data/proposal/cooperation_area_value" />
			</c:set> <cpt:select id="cooperation_area" style="width:177px;" key="country"
				value="${cooperation_area}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="cooperation_area_value"
			name="proposal/cooperation_area_value" class="required"
			value="${cooperation_area}" label="所在地区"> <input
			type="hidden" name="proposal/cooperation_area_name"
			value="<x:out select="$xmlData/data/proposal/cooperation_area_name" />"> --%>
		</td>
		<td align="right">电子邮箱：</td>
		<td colspan="2"><span name="proposal/contact/email"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/email" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>个人通讯地址：</td>
		<td colspan="2"><input
			name="proposal/basic_info/communication_address" maxlength="50"
			class="required" label="个人通讯地址" style="width:71%"
			value="<x:out select="$xmlData/data/proposal/basic_info/communication_address" />" />
		</td>
		<td align="right">联系电话：</td>
		<td colspan="2">
			<span name="proposal/contact/tel_work"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/tel_work" />
			</span>
		</td>
	</tr>

	<tr>
		<td align="right">工作单位：</td>
		<td colspan="5"><span name="proposal/basic_info/org_name">
				<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/org_name" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>主要研究领域：</td>
		<td  colspan="2"><input name="proposal/basic_info/major_direction"
			maxlength="50" class="required" label="主要研究领域" style="width:71%"
			value="<x:out select="$xmlData/data/proposal/basic_info/major_direction" />" />
		</td>
		<td align="right">现从事专业：</td>
		<td  colspan="2"><span name="proposal/contact/major_work"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/major_work" />
		</span></td>
	</tr>

	<%-- <tr>
		<td align="right">职称：</td>
		<td>
			<c:set var="json_contact_prof_title_value">
				{'id':'<x:out select="$xmlData/data/proposal/contact_prof_title_value" />',
				'name':'<x:out select="$xmlData/data/proposal/contact_prof_title_name" />'
				}					
			</c:set>

			<cpt:tree key="prof_title" cacheable="false" value="${json_contact_prof_title_value }"
				id="contact_prof_title" name="contact_prof_title" readonly="true"
			 	onClick="initTreeValueExt" />
			 	
			<input type="hidden" id="contact_prof_title_value"
				name="proposal/contact_prof_title_value"
				value="<x:out select="$xmlData/data/proposal/contact_prof_title_value" />" class="required" label="职称" />
			<input type="hidden" id="contact_prof_title_name"
				name="proposal/contact_prof_title_name"
				value="<x:out select="$xmlData/data/proposal/contact_prof_title_name"/>" />
		</td>
		<td align="right">职务：</td>
		<td>
			<input name="proposal/contact_position"
				value="<x:out select="$xmlData/data/proposal/contact_position"/>"
				class="required maxlength:50" label="职务" />
		</td>
	</tr> --%>

	<tr>
		<td ></td>
		<td align="center">授予院校</td>
		<td align="center">国别</td>
		<td align="center">所学专业</td>
		<td align="center">授予时间</td>
		<td align="center">导师姓名</td>
	</tr>
	
	<tr>
		<td align="right">硕士学位：</td>
		<td align="center">
			<input style="width:75%" label="硕士学位-->授予院校" name="proposal/learn/college_master" onchange="rows()" id="college_master" class="input_text "  value="<x:out select="$xmlData/data/proposal/learn/college_master"/>"  maxlength="100"/>
		</td>
		<td align="center">
			<c:set var="mater_country">
				<x:out select="$xmlData/data/proposal/mater_country_value" />
			</c:set> <cpt:select id="mater_country"  key="country" style="width:75%"
				value="${mater_country}"  onChange="initControlValue(this.id);rows()"></cpt:select>
			<input type="hidden" id="mater_country_value" id="mater_country_value" label="硕士学位-->国别"
			name="proposal/mater_country_value"
			value="${mater_country}" > <input
			type="hidden" name="proposal/mater_country_name"
			value="<x:out select="$xmlData/data/proposal/mater_country_name" />">
		</td>
		<td align="center">
			<input type="text"  label="硕士学位-->所学专业" name="proposal/major_master"
			 onchange="rows()" id="major_master" class="input_css  maxlength:100"  maxlength="100" style="width:75%"
			value="<x:out select="$xmlData/data/proposal/major_master"/>">
		</td>
		<td align="center">
		    <c:set var="awarded_date"><x:out select="$xmlData/data/proposal/reward/awarded_master" /></c:set> 
			<cpt:date id="awarded_date" size="8" onChange="rows()" name="proposal/reward/awarded_master" value="${awarded_date}"  className=" date" label="硕士学位-->授予时间" ></cpt:date>
		</td>

		<td align="center">
			<input type="text" label="硕士学位-->导师姓名"
			name="proposal/teachername_master" onchange="rows()" id="teachername_master" class="input_css "
			maxlength="100" style="width:75%"
			value="<x:out select="$xmlData/data/proposal/teachername_master" />">
		</td>
	</tr> 
	
	<tr>
		<td align="right">博士学位：</td>
		<td align="center">
			<input style="width:75%" name="proposal/learn/college_doctor" id="college_doctor" onchange="rows2()" class="input_text " label="博士学位-->授予院校" value="<x:out select="$xmlData/data/proposal/learn/college_doctor"/>"  maxlength="100"/>
		</td>
		<td align="center">
			<c:set var="doctor_country">
				<x:out select="$xmlData/data/proposal/doctor_country_value" />
			</c:set> <cpt:select id="doctor_country"  key="country" style="width:75%"
				value="${doctor_country}"  onChange="initControlValue(this.id);rows2()"></cpt:select>
			<input type="hidden" id="doctor_country_value" 
			name="proposal/doctor_country_value"  id="doctor_country_value"
			value="${doctor_country}" label="博士学位-->国别"> <input
			type="hidden" name="proposal/doctor_country_name"
			value="<x:out select="$xmlData/data/proposal/doctor_country_name" />">
		</td>
		<td align="center">
			<input type='text' name='proposal/major_doctor' label="博士学位-->所学专业"
			class="input_css  maxlength:100" onchange="rows2()" id="major_doctor" maxlength="100" style="width:75%"
			value='<x:out select="$xmlData/data/proposal/major_doctor"/>'>
		</td>
		<td align="center">
		    <c:set var="awarded_date2"><x:out select="$xmlData/data/proposal/reward/awarded_doctor" /></c:set> 
			<cpt:date id="awarded_date2" onChange="rows2()" size="8" name="proposal/reward/awarded_doctor" value="${awarded_date2}"  className=" date" label="博士学位-->授予时间"></cpt:date>
		</td>

		<td align="center">
			<input type="text" label="博士学位-->导师姓名"
			name="proposal/teachername_doctor" class="input_css "
			maxlength="100" style="width:75%" onchange="rows2()" id="teachername_doctor"
			value="<x:out select="$xmlData/data/proposal/teachername_doctor" />">
		</td>
	</tr>
	
</table>

<div class="t_bar2"
	style="height: 30px; margin-bottom: -10px; padding-top: 5px; text-align: left;">合作研究单位信息(限2条)</div>
<table class="t_css  table01" width="100%" border="0" cellpadding="0" id="cooperativeunit" cellspacing="1">
		<col style="width: 10%" />
		<col style="width: 20%" />
		<col style="width: 60%" />
		<thead>
		<th align="center">选择</th>
		<th align="center">序号</th>
		<th align="center">单位名称</th>
		</thead>
		<tbody id="tab">
		<tr style="display: none" align="center">
			<td align="center"><input type="radio" class="radiobutton" 
				name="selfund_cooperativeunit"></td>
			<td align="center"><span name="cooperativeunits|cooperativeunit[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input 
				name="cooperativeunits|cooperativeunit[0]|company_name" label="单位名称" value=""
				class="required input_text" style="width: 90%;" onchange="splitAcademicianName()" maxlength="100" /></td>
		</tr>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/cooperativeunits/cooperativeunit" var="cooperativeunit">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">
				<td><input type="radio" class="radiobutton" name="selfund_cooperativeunit"></td>
				<td align="center"><span name="cooperativeunits/cooperativeunit[${flag}${index}]@seq_no"><x:out select="$cooperativeunit/@seq_no" /></span></td>
				<td><input id="company_name_[${flag}${index}]" value="<x:out select="$cooperativeunit/company_name"/>"label="单位名称" name="cooperativeunits/cooperativeunit[${flag}${index}]/company_name" maxlength="100" onchange="splitAcademicianName()" class="required input_text" style="width: 90%" /></td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
			showAllDateTag("cooperativeunit");
		</script>
	</tbody>
</table>
<table width="100%" align="center">
	<tr>
		<td>
		<input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="if(checkTabLimit('cooperativeunit','2','最多只能添加2条合作研究单位信息')){addNewRow('cooperativeunit');splitAcademicianName();}">
			<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('cooperativeunit','selfund_cooperativeunit');splitAcademicianName();">
			<input class="button" name="cmdMoveNext" type=button value="下移"onclick="moveNext('cooperativeunit','selfund_cooperativeunit');splitAcademicianName();">
			<input class="button" name="cmddel" type=button value="删除" onclick="deleteSelectedRow('cooperativeunit','合作研究单位信息');splitAcademicianName();"></td>
	</tr>
</table>
<script type="text/javascript">
	$(function() {
		showAllDateTag("pro_info");
		addlevel();
		InitMoney1 ();
		rows();
		rows2();
		
	});
	/* 用来显示等级-职称 */
	function addlevel(){
		var level = $("#level_no").val();
		var prof_title_name = $("#prof_title_name").val();
		var string1 = "未取得";
		var string2 = "高级-";
		var string3 = "副高级-";
		var string4 = "中级-";
		var string5 = "初级-";
		if(level.length<=0 || level==""){
			$("#prof_title").html(string1);
		}else if(level==1){
			$("#prof_title").html(string2+prof_title_name);
		}else if(level==2){
			$("#prof_title").html(string3+prof_title_name);
		}else if(level==3){
			$("#prof_title").html(string4+prof_title_name);
		}else if(level==4){
			$("#prof_title").html(string5+prof_title_name);
		}
	}

	function splitAcademicianName(){
		var name='';
		// $("#inland span[name $= 'org_name']").each(function(){
		//     name = name+"，"+$(this).text() ;
		// });
		$("#cooperativeunit").find("tr:gt(1)").each(function(){
			name = name+"，"+ $(this).find("input[name$='company_name']").val();
		})
		name=name.substring(1);
		$("input[name='proposal/cooperative_unit']").val(name);
	}
	

	function initTreeValueExt(treeId, treeNode) {
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_code'],[id$='" + treeId
								+ "_code']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_value'],[id$='" + treeId
								+ "_value']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_name'],[id$='" + treeId
								+ "_name']").val("");
			}

			return false;
		}

		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			obj = obj.parentNode;
		}

		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);

	}
	
	function initTreeValueExt2(treeId, treeNode) {
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_code'],[id$='" + treeId
								+ "_code']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_value'],[id$='" + treeId
								+ "_value']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_name'],[id$='" + treeId
								+ "_name']").val("");
			}

			return false;
		}

		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			obj = obj.parentNode;
		}

		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);

	}

	function InitMoney1() {

		var apply_money = $("#applyMoney").val();
		if (apply_money == '' || apply_money == undefined) {
			apply_money = '0.00'
		}
		$("#total_each_0").val(parseFloat(apply_money).toFixed(2));
		$("#total_fund_18").val(parseFloat(apply_money).toFixed(2));

	}

	function rows(){
		var awarded_master = $("input[name='proposal/reward/awarded_master']").val();
		var college_master = $("#college_master").val();
		var mater_country_value = $("#mater_country").val();
		var major_master = $("#major_master").val();
		var teachername_master = $("#teachername_master").val();

		if( awarded_master == "" && college_master == "" && mater_country_value == "" && major_master == "" && teachername_master == "" ){
			$("#college_master").removeClass("required");
			$("#mater_country_value").removeClass("required");
			$("#major_master").removeClass("required");
			$("#teachername_master").removeClass("required");
			$("input[name='proposal/reward/awarded_master']").removeClass("required");
		}else {
			$("#college_master").addClass("required");
			$("#mater_country_value").addClass("required");
			$("#major_master").addClass("required");
			$("#teachername_master").addClass("required");
			$("input[name='proposal/reward/awarded_master']").addClass("required");
		}

	}
	function rows2(){
		var awarded_doctor = $("input[name='proposal/reward/awarded_doctor']").val();
		var college_doctor = $("#college_doctor").val();
		var doctor_country_value = $("#doctor_country_value").val();
		var major_doctor = $("#major_doctor").val();
		var teachername_doctor = $("#teachername_doctor").val();

		if( awarded_doctor == "" && college_doctor == "" && doctor_country_value == "" && major_doctor == "" && teachername_doctor == "" ){
			$("#college_doctor").removeClass("required");
			$("#doctor_country_value").removeClass("required");
			$("#major_doctor").removeClass("required");
			$("#teachername_doctor").removeClass("required");
			$("input[name='proposal/reward/awarded_doctor']").removeClass("required");
		}else {
			$("#college_doctor").addClass("required");
			$("#doctor_country_value").addClass("required");
			$("#major_doctor").addClass("required");
			$("#teachername_doctor").addClass("required");
			$("input[name='proposal/reward/awarded_doctor']").addClass("required");
		}

	}
</script>
